package com.g17.virtualpetbackend.repo;

import com.g17.virtualpetbackend.entity.Office;
import com.g17.virtualpetbackend.entity.Receptionist;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.neo4j.repository.query.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface OfficeRepository extends Neo4jRepository<Office,Long> {

    @Query("MATCH (n:Office) where n.office_name=$office_name RETURN n")
    Office getOfficeDetail(@Param("office_name") String office_name);

    @Query("MATCH (n:Office) RETURN n")
    List<Office> findOffices();

}
